package org.system.core.enums;

import lombok.Getter;
import org.system.core.utils.MessageUtils;

/**
 * @author baoRoot
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(200, MessageUtils.message("system.result.message.success")),
    FAIL(400, MessageUtils.message("system.result.message.error")),
    PARAMS_ERROR(412, MessageUtils.message("system.result.message.params_error")),
    AUTHORITY_ERROR(401, MessageUtils.message("system.result.message.authority_error"));

    private final Integer code;
    private final String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
